package com.kk.springboot_001.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kk.springboot_001.pojo.dto.Fruit;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.security.auth.Subject;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_user") // 使用MyBatis-Plus的注解来映射表名
public class User {

    @TableId(type = IdType.AUTO)
    private Integer userId;

    @TableField("user_name")
    private String userName;

    @TableField("password")
    private String password;

    @TableField("email")
    private String email;

    @TableField(exist = false)
    private List<Fruit> fruits;

}